package com.maybach.workflow.core.manager;

import com.maybach.util.query.support.PageResult;
import com.maybach.workflow.common.model.FlowDO;
import com.maybach.workflow.common.query.FlowQuery;

import java.util.List;


/**
 * Manager for Flow.
 */
public interface FlowManager {
    /**
     * query count by query condition.
     */
    int countByQuery(FlowQuery query);

    /**
     * delete by query condition.
     */
    int deleteByQuery(FlowQuery query);

    /**
     * delete by primary key.
     */
    int deleteByPrimaryKey(Long id);

    /**
     * insert selective.
     */
    long insertSelective(FlowDO record);

    /**
     * select by query condition.
     */
    List<FlowDO> selectByQuery(FlowQuery query);


    /**
     * select by query condition with page.
     */
    PageResult<FlowDO> selectByQueryWithPage(FlowQuery query);

    /**
     * select by primary key.
     */
    FlowDO selectByPrimaryKey(Long id);

    /**
     * update by query condition selective.
     */
    int updateByQuerySelective( FlowDO record,  FlowQuery query);

    /**
     * update by query condition.
     */
    int updateByQuery(FlowDO record, FlowQuery query);

    /**
     * update by primary key selective.
     */
    int updateByPrimaryKeySelective(FlowDO record);
}